import Layout from '@/views/layout'

// 公共路由
const commonMenu = [
  {
    path: 'callAmbientDriver',
    name: 'callAmbientDriver',
    hidden: true,
    meta: {
      title: '召唤周边司机',
      parent: 'marketHelper',
    },
    component: () => import('@/views/marketShop/subPages/marketHelper/callAmbientDriver')
  },
  {
    path: 'callGoneDriver',
    name: 'callGoneDriver',
    hidden: true,
    meta: {
      title: '召回流失司机',
      parent: 'marketHelper',
    },
    component: () => import('@/views/marketShop/subPages/marketHelper/callGoneDriver')
  },
  {
    path: 'gasCoupon',
    name: 'gasCoupon',
    hidden: true,
    meta: {
      title: '店铺领券',
      parent: 'marketHelper',
    },
    component: () => import('@/views/marketShop/subPages/marketHelper/gasCoupon')
  },
  {
    path: 'gasSort',
    name: 'gasSort',
    hidden: true,
    meta: {
      title: '油站排序',
      parent: 'marketHelper',
    },
    component: () => import('@/views/marketShop/subPages/marketHelper/gasSort')
  },
  {
    path: 'memberCare',
    name: 'memberCare',
    hidden: true,
    meta: {
      title: '会员关怀',
      parent: 'marketHelper',
    },
    component: () => import('@/views/marketShop/subPages/memberCare')
  },
  {
    path: 'stationMasterShouts',
    name: 'stationMasterShouts',
    hidden: true,
    meta: {
      title: '站长喊话',
      parent: 'marketHelper',
    },
    component: () => import('@/views/marketShop/subPages/stationMasterShouts')
  },
  {
    path: 'orderSuccess',
    name: 'orderSuccess',
    hidden: true,
    meta: {
      title: '排序成功',
      parent: 'marketHelper'
    },
    component: () => import('@/views/marketShop/subPages/marketHelper/success')
  },
  {
    path: 'loadingAmbient',
    name: 'loadingAmbient',
    hidden: true,
    meta: {
      title: '周边司机召唤完成',
      parent: 'callAmbientDriver',
    },
    component: () => import('@/views/marketShop/subPages/marketHelper/loadingAmbient')
  },
  {
    path: 'loadingGone',
    name: 'loadingGone',
    hidden: true,
    meta: {
      title: '流失司机召回完成',
      parent: 'callGoneDriver',
    },
    component: () => import('@/views/marketShop/subPages/marketHelper/loadingGone')
  },
  {
    path: 'activitySuccess',
    name: 'activitySuccess',
    hidden: true,
    meta: {
      title: '活动发起成功',
      parent: 'marketHelper',
    },
    component: () => import('@/views/marketShop/subPages/common/success')
  },
  {
    path: 'effectSort',
    name: 'effectSort',
    hidden: true,
    meta: {
      title: '油站排序效果分析',
      parent: 'marketCenter',
    },
    component: () => import('@/views/marketShop/subPages/marketList/effectSort')
  },
  {
    path: 'effectAmbient',
    name: 'effectAmbient',
    hidden: true,
    meta: {
      title: '周边司机效果分析',
      parent: 'marketCenter',
    },
    component: () => import('@/views/marketShop/subPages/marketList/effectAmbient')
  },
  {
    path: 'effectGone',
    name: 'effectGone',
    hidden: true,
    meta: {
      title: '流失司机效果分析',
      parent: 'marketCenter',
    },
    component: () => import('@/views/marketShop/subPages/marketList/effectGone')
  },
  {
    path: 'effectCoupon',
    name: 'effectCoupon',
    hidden: true,
    meta: {
      title: '店铺领券效果分析',
      parent: 'marketCenter',
    },
    component: () => import('@/views/marketShop/subPages/marketList/effectCoupon')
  },
  {
    path: 'effectMember',
    name: 'effectMember',
    hidden: true,
    meta: {
      title: '会员关怀效果分析',
      parent: 'activityList',
    },
    component: () => import('@/views/marketShop/subPages/marketList/effectMember')
  },
  {
    path: 'effectSpecialPrice',
    name: 'effectSpecialPrice',
    hidden: true,
    meta: {
      title: '天天特价效果分析',
      parent: 'activityList',
    },
    component: () => import('@/views/marketShop/subPages/marketList/effectSpecialPrice')
  }
]

export default [
  {
    path: '/home',
    name: 'home',
    redirect: '/home/index',
    component: Layout,
    meta: {
      icon: 'home.png',
      type: 'shop',
      title: '首页',
      index: 1
    },
    children: [
      {
        path: 'index',
        name: 'index',
        meta: {
          title: '首页'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/home')
      }
    ]
  },
  {
    path: '/marketShop',
    name: 'marketShop',
    redirect: '/marketShop/shopCenter',
    component: Layout,
    meta: {
      icon: 'shopPlus.png',
      type: 'shop',
      title: '能＋商城',
      index: 4
    },
    children: [
      {
        path: 'shopCenter',
        name: 'shopCenter',
        meta: {
          title: '能＋商城'
        },
        component: () => import('@/views/marketShop/shopCenter')
      },
      {
        path: 'orderList',
        name: 'orderList',
        meta: {
          title: '套餐购买记录'
        },
        component: () => import('@/views/marketShop/marketOrder')
      },
      {
        path: 'placeOrder',
        name: 'placeOrder',
        hidden: true,
        meta: {
          title: '套餐包下单',
          parent: 'shopCenter'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/placeOrder')
      },
      {
        path: 'paymentOrder',
        name: 'paymentOrder',
        hidden: true,
        meta: {
          title: '订单支付',
          parent: 'shopCenter'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/paymentOrder')
      },
      {
        path: 'orderCompletion',
        name: 'orderCompletion',
        hidden: true,
        meta: {
          title: '订单完成',
          parent: 'shopCenter'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/orderCompletion')
      },
      {
        path: 'userAgreement',
        name: 'userAgreement',
        hidden: true,
        meta: {
          title: '团油用户协议'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/userAgreement')
      },
      {
        path: 'goneShow',
        name: 'goneShow',
        hidden: true,
        meta: {
          title: '流失司机介绍'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/goneShow')
      },
      {
        path: 'ambientShow',
        name: 'ambientShow',
        hidden: true,
        meta: {
          title: '周边司机介绍'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/ambientShow')
      },
      {
        path: 'gasSortShow',
        name: 'gasSortShow',
        hidden: true,
        meta: {
          title: '油站排序介绍'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/gasSortShow')
      }, 
      {
        path: 'couponShow',
        name: 'couponShow',
        hidden: true,
        meta: {
          title: '店铺领券介绍'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/couponShow')
      },
      {
        path: 'helperShow',
        name: 'helperShow',
        hidden: true,
        meta: {
          title: '小助手介绍'
        },
        component: () => import('@/views/marketShop/subPages/shopCenter/helperShow')
      }
    ]
  },
  {
    path: '/marketCenter',
    name: 'marketCenter',
    redirect: '/marketCenter/marketHelper',
    component: Layout,
    meta: {
      icon: 'saleHelper.png',
      type: 'shop',
      title: '能＋小助手',
      index: 5
    },
    children: [
      {
        path: 'marketHelper',
        name: 'marketHelper',
        meta: {
          title: '能＋小助手'
        },
        component: () => import('@/views/marketShop/marketHelper')
      },
      /* 能＋小助手菜单的子路由页面部分 */
      ...commonMenu
    ]
  },
  {
    path: '/vipPool',
    name: 'vipPool',
    redirect: '/vipPool/vipAnalyse',
    component: Layout,
    meta: {
      icon: 'member.png',
      title: '会员管理',
      type: 'shop',
      index: 3
    },
    children: [
      {
        path: 'vipAnalyse',
        name: 'vipAnalyse',
        componentName: 'vipPool_vipAnalyse',
        meta: {
          title: '会员管理'
        },
        component: () => import('@/views/vipPool/vipAnalyse')
      },
      {
        path: 'labelManage',
        name: 'labelManage',
        meta: {
          title: '标签分析'
        },
        component: () => import('@/views/vipPool/labelManage')
      },
      {
        path: 'Intelligent',
        name: 'Intelligent',
        hidden: true,
        meta: {
          title: '智能分群'
        },
        component: () => import('@/views/vipPool/Intelligent')
      }
    ]
  },
  {
    path: '/dataAnalyze',
    name: 'dataAnalyze',
    redirect: '/dataAnalyze/dataAnalyze_index',
    component: Layout,
    meta: {
      icon: 'dataAnalyze.png',
      type: 'shop',
      index: 6
    },
    children: [
      {
        path: 'dataAnalyze_index',
        name: 'dataAnalyze_index',
        meta: {
          title: '数据分析'
        },
        component: () => import('@/views/marketShop/marketList')
      },
      ...commonMenu
    ]
  }
]